package com.examstack.portal.service;

import java.util.List;
import java.util.Map;

import com.examstack.common.domain.exam.UserQuestionCollect;
import com.examstack.common.domain.practice.Collect;
import com.examstack.common.domain.question.QuestionStatistic;

public interface QuestionCollectService {

	/**
	 * 插入试题收藏
	 */
	public void addUserCollect(Collect co);

	/**
	 * 插入试题收藏
	 * @param historyList
	 */
	public void addUserQuestionCollect(UserQuestionCollect ... history);
	/**
	 * 查询收藏
	 * @param userid
	 * @param questionid
	 * @return
	 */
	public Collect Collect(int userid, int questionid);
	
	/**
	 * 取消收藏
	 * @param questionid
	 * @param userid
	 */
	public void updUserCollect(int userid, int questionid,String isCollect);
	
	
	/**
	 * 获取用户的试题收藏
	 * @param userId
	 * @param fieldId
	 * @return
	 */
	public Map<Integer, List<UserQuestionCollect>> getUserQuestionCollect(int userId, int fieldId);
	
	
	/**
	 * 根据fieldId,pointId分组统计练习收藏试题数量
	 * @param fieldId
	 * @param userId
	 * @return
	 */
	public Map<Integer,QuestionStatistic> getQuestionCollectStaticByFieldId(int fieldId, int userId);
	
	/**
	 * 根据fieldId,pointId,typeId分组统计练习收藏试题数量
	 * @param fieldId
	 * @param userId
	 * @return
	 */
	public Map<Integer,Map<Integer,QuestionStatistic>> getTypeQuestionCollectStaticByFieldId(int fieldId, int userId);

	
}
